package guo.mytesttreeview.bean;

import com.chen.treeview.model.NodeChild;
import com.chen.treeview.model.NodeId;
import com.chen.treeview.model.NodeName;
import com.chen.treeview.model.NodePid;

import java.util.List;

/**
 * Created by ${GuoZhaoHui} on 2017/11/10.
 * Email:guozhaohui628@gmail.com
 */

public class PowerModel {

    //通过注解的方式，进行model转换
    @NodeId                 //必填字段
    public String id;
    @NodeName               //必填字段
    public String name;

    @NodePid                //必填字段
    public String parentId;

    @NodeChild
    public List<PowerModel> child;  //非叶子节点必填字段

    @Override
    public String toString() {
        return "PowerModel{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", parentId='" + parentId + '\'' +
                ", child=" + child +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public List<PowerModel> getChild() {
        return child;
    }

    public void setChild(List<PowerModel> child) {
        this.child = child;
    }
}
